import Vue from 'vue'
import App from './App.vue'
import router from './router'
import less from 'less'
import GoProdct from './uitl/util'
import { MdContent } from 'vue-material/dist/components'
import 'vue-material/dist/vue-material.min.css'
import 'vue-material/dist/theme/default.css'
import { Upload, Tag, DatePicker, Tabs, TabPane, Avatar, Progress, Rate, CheckboxGroup, CheckboxButton, Button, Input, Form, FormItem, Row, Col, Carousel, CarouselItem, Collapse, CollapseItem, InputNumber, Menu, MenuItem } from 'element-ui'
import axios from 'axios'

Vue.use(Upload)
Vue.use(Tag)
Vue.use(DatePicker)
Vue.use(Tabs)
Vue.use(TabPane)
Vue.use(Button)
Vue.use(Input)
Vue.use(Form)
Vue.use(FormItem)
Vue.use(Row)
Vue.use(Col)
Vue.use(Carousel)
Vue.use(CarouselItem)
Vue.use(Collapse)
Vue.use(CollapseItem)
Vue.use(InputNumber)
Vue.use(Menu)
Vue.use(MenuItem)
Vue.use(CheckboxButton)
Vue.use(CheckboxGroup)
Vue.use(Rate)
Vue.use(Progress)
Vue.use(Avatar)

axios.defaults.baseURL = 'http://127.0.0.1:1110/api'
Vue.prototype.$axios = axios

Vue.use(MdContent)
Vue.config.productionTip = false

new Vue({
  router,
  less,
  render: h => h(App),
  beforeMount () {
    // 安装全局事件总线
    Vue.prototype.$bus = this
    Vue.prototype.$goProdct = GoProdct
  }
}).$mount('#app')
